@extends('layouts.app')

@section('content')
    <div class="content">
        <div class="header">
            <ul class="breadcrumb">
                <li><i class="fa fa-fw fa-cog"></i>组织管理</li>
                <li>单位检查情况</li>
            </ul>
        </div>
        <div class="main-content main-content2">
            {{--<h2 class="text-center content_tt">单位基本信息</h2>--}}
                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                <div class="row">
                    <br>
                    <div>
                        <!-- Nav tabs -->
                        <ul class="nav nav-tabs" role="tablist">
                            <li role="presentation" class="active"><a href="#tab1" aria-controls="tab" role="tab" data-toggle="tab">安全检查</a></li>
                            <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab">安全隐患</a></li>
                            <li role="presentation"><a href="#tab3" aria-controls="tab3" role="tab" data-toggle="tab">不安定因素</a></li>
                            <li role="presentation"><a href="#tab4" aria-controls="tab4" role="tab" data-toggle="tab">灾害事故</a></li>
                        </ul>

                        <!-- Tab panes -->
                        <div class="tab-content">
                            <div role="tabpanel" class="tab-pane active" id="tab1">
                                <br>
                                <table class="table table-form table-striped table-bordered table-condensed">
                                    <thead>
                                    <tr>
                                        <th width="80">序号</th>
                                        <th>检查人</th>
                                        <th>是否合格</th>
                                        <th>检查时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    @foreach ($jiancha as $key=>$re)
                                        <tr>
                                            <td>{{ $key+1 }}</td>
                                            <td>{{ getValue($re->user_id,'admin_users','id','name') }}</td>
                                            <td>
                                                @if($re->status == 1)合格
                                                @else不合格
                                                @endif
                                            </td>
                                            <td><span>{{ $re->created_at }}</span></td>
                                            <td>
                                                <a href="{{url('admin/safe/ckaqjc',$re->id)}}" class="label label-success tag">查看</a>
                                            </td>
                                        </tr>
                                    @endforeach
                                    </tbody>
                                </table>
                            </div>
                            <div role="tabpanel" class="tab-pane" id="tab2">
                                <br>
                                <table class="table table-form table-striped table-bordered table-condensed">
                                    <thead>
                                    <tr>
                                        <th width="80">序号</th>
                                        <th>主要内容</th>
                                        <th>修改时间</th>
                                        <th>操作人</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    @foreach ($yinhuan as $key=>$re)
                                        <tr>
                                            <td>{{ $key+1 }}</td>
                                            <td>{{ $re->desc }}</td>
                                            <td>{{ $re->updated_at }}</td>
                                            <td>{{ getValue($re->user_id,'admin_users','id','name') }}</td>
                                        </tr>
                                    @endforeach
                                    </tbody>
                                </table>
                            </div>

                            <div role="tabpanel" class="tab-pane" id="tab3">
                                <br>
                                <table class="table table-form table-striped table-bordered table-condensed">
                                    <thead>
                                    <tr>
                                        <th width="80">序号</th>
                                        <th>姓名</th>
                                        <th>类别</th>
                                        <th>性别</th>
                                        <th>身份证号</th>
                                        <th>修改时间</th>
                                        <th>操作人</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    @foreach ($buanding as $key=>$re)
                                        <tr>
                                            <td>{{ $key+1 }}</td>
                                            <td><span>{{ $re->name }}</span></td>
                                            <td>
                                                @if($re->type == 1)少数民族
                                                @elseif($re->type == 2)犯罪前科
                                                @endif
                                            </td>
                                            <td><span>{{ $re->sex }}</span></td>
                                            <td><span>{{ $re->id_number }}</span></td>
                                            <td><span>{{ $re->updated_at }}</span></td>
                                            <td>{{ getValue($re->user_id,'admin_users','id','name') }}</td>
                                        </tr>
                                    @endforeach
                                    </tbody>
                                </table>
                            </div>

                            <div role="tabpanel" class="tab-pane" id="tab4">
                                <br>
                                <table class="table table-form table-striped table-bordered table-condensed">
                                    <thead>
                                    <tr>
                                        <th width="80">序号</th>
                                        <th>主要内容</th>
                                        <th>发生时间</th>
                                        <th>操作人</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    @foreach ($shigu as $key=>$re)
                                        <tr>
                                            <td>{{ $key+1 }}</td>
                                            <td>{{ $re->content }}</td>
                                            <td>{{ $re->add_time }}</td>
                                            <td>{{ getValue($re->user_id,'admin_users','id','name') }}</td>
                                        </tr>
                                    @endforeach
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>

                </div>

                <div class="btn-toolbar list-toolbar list-toolbar2  ">
                    <a href="javascript:history.back(-1);" class="btn btn-back">返回</a>
                </div>
        </div>
    </div>
@stop